<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>群列表</title>
    <?php PrintPageHead(); ?>
    <link href="../resource/css/hermes.css" rel="stylesheet">
    <link href="../resource/js/calendar/calendar-blue.css" type="text/css" rel="stylesheet">
    <script src="../resource/js/calendar/calendar.js" type="text/javascript"></script>
    <script src="../resource/js/hermes.js"></script>
    <style type="text/css">
        .divleft{width: 25%; float: left; text-align:left; border-right: solid 1px #d5d5d5; margin-right: 2% }
        .divcenter{width: 25%; float: left; text-align:left; border-right: solid 1px #d5d5d5; margin-right: 2%}

        .divright{ width: 15%; float: left; text-align:left;  margin-right: 2%}
        .position {
            position: absolute;
            display: none;
            z-index: 15;
            width: 400px;
            height: 40px;
            margin: -20px 0 0 -75px;
            padding: 0 10px;
            background: #eee;
            line-height: 2.4;
            cursor:pointer;
        }
    </style>
    <?php
    if (!array_key_exists("公众号ID",$_SESSION)) {
        header("Location:back.php");
    }
    pdo()->beginTransaction();
    $bm=new C后台管理员();
    $act = $_GET['act']==''?1:$_GET['act'];
    $群成员页面 = 'back.php?state=back10QunCY_List';
    $群聊天记录页面 = 'back.php?state=back10QunLT_List';
    $Get群列表=$bm->Get群列表($_GET['page'],$_GET,$_POST['keywords']);
    if($_POST['状态']) {
//        header("location:".$本页面);
    }

    ?>
</head>
<body>


<div class="container-fluid">
    <?php include_once 'back_header.php'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">群列表</h3></div>
        <div class="panel-body" style="text-align:center">
            <div style="margin: 0 0 10px 0;text-align:left"><b style="color:#3c763d;font-size: 16px;">群名称查询</b><br/>
                <form action="" method="post">
                    <input type="text" name="keywords" value="<?=$_POST['keywords']?>">&nbsp;&nbsp;
                    <button type="submit"  class="btn btn-default btn-success ">&nbsp;查 询&nbsp;</button></form></div>
            <div class="panel-group"  id="accordion" role="tablist" aria-multiselectable="true">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="row" style="">
                          <div class="divleft">
                                群组名称
                            </div>
                            <div class="divcenter">
                                成员数
                            </div>
                           
                            <div class="divcenter">
                                群主
                            </div>
                           
                            <div class="divright" style="text-align:center">
                                操作
                            </div>
                        </div>
                    </div>
                </div>
                <?php foreach($Get群列表['result'] as $v){?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="row" style="">
                                <div class="divleft">
                                    <?=$v['群名称']?>
                                </div>
                                <div class="divcenter">
                                    <span class="diqu" style="cursor:pointer"></span><input type="hidden" value="<?=$v['id']?>">
                                </div>
                                <div class="divcenter">
                                    <?=$v['管理员']."&nbsp;   " ; ?>
                                </div>

                                <div class="divright" style="text-align:center">
                                    <a href="<?=$群成员页面?>&id=<?=$v['id']?>">群成员</a>
                                    &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
                                    <a href="<?=$群聊天记录页面?>&id=<?=$v['id']?>">聊天记录</a>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php }
                if(!$Get群列表['result']){
                ?>
                <div class="panel-heading text-center"><h3 class="panel-title">没有数据 !!!</h3></div>
                <?php }?>
            </div>
            <?=$Get群列表['show']?>
        </div>

    </div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../resource/js/jquery-1.11.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../resource/js/bootstrap.min.js"></script>
<script language="JavaScript">
    $(function(){
        $(".fun").click(function(){
            $(this).next("div").show();
        })
        $(".fun1").click(function(){
            $(this).parent("div").hide();
        })
    })
    $(function(){
        aa=new Array();
        $(".diqu").each(function(i){
            aa[i]=$(".diqu:eq("+i+")").next("input").val();
            $.ajax({
                type:'post',
                url:'BackSellerAjax.php?businessFlag=成员数',
                dataType:'html',
                data:'id='+aa[i],
                success:function(msg){
                    $(".diqu:eq("+i+")").html(msg);
                }
            })

        })
    })
</script>
</body>
</html>